module.exports = {
  publicPath: "./",
  outputDir: "student", //构建时输出的目录
  assetsDir: "staic", //放置静态资源目录
  indexPath: "index.html", //html 输出路径
  filenameHashing: true, //文件名哈希值
  pages: {
    index: {
      entry: "src/main.js", //page 入口文件
      template: "index.html", //模板文件
      filename: "index.html", //在dist/index.html 的输出文件
      title: "考试指引",
    },
  },
  configureWebpack: {},
  css: {
    loaderOptions: {
      postcss: {
        plugins: [
          require('postcss-pxtorem')({ // 把px单位换算成rem单位
            rootValue: 132, // 换算的基数(设计图750的根字体为75)
            propList: ['*'], // 指定转换成rem的属性 可配置:['font','font-size','line-height','letter-spacing']
            unitPrecision:5,
          })
        ]
      }
    },
  },

  devServer: {
    host: "0.0.0.0",
    port: 8052,
    open: true, //配置自动启动浏览器
    proxy: {
      "/platform": {
        target: "https://192.168.15.23:6070", //对应服务器的接口
        changeOrigin: true,
        pathRewrite: {
          "^/platform": "/",
        },
      },
      "/imgs": {
        target: "http://192.168.15.238:6115", //对应服务器的接口
        changeOrigin: true,
        // pathRewrite: {
        //   "^/platform": "/",
        // },
      },

      "/NetSDK": {
        target: "http://192.168.15.33:6070", //对应服务器的接口
        changeOrigin: true,
        // pathRewrite: {
        //   "^/platform": "/",
        // },
      },

    }
  }

}